<div>
  <form class="form-horizontal" role="form" novalidate name="myForm" ng-init="initQuery()">
    <div class="form-ctrl md-whiteframe-z1">
      <div class="form-search" style="height:190px;" ng-class="{true: 'shou'}[!flag.state]" >
           <div>
          <label>时间</label>
          <md-input-container flex>
            <label>开始时间</label>
            <input type="date" ng-model="params.startTime"  time-validate="day" end-time="params.endTime" required
                   name="startDate">
            <div ng-messages="myForm.startDate.$error" >
              <div ng-message="date">请正确输入时间</div>
              <div ng-message="time-error">开始时间不应大于结束时间</div>
              <div ng-message="too-great">结束时间不应大于当前时间</div>
            </div>
          </md-input-container>
        </div>
        <div>
          <md-input-container flex>
            <label>结束时间</label>
            <input type="date" ng-model="params.endTime" time-validate="day" start-time="params.startTime" required
                   name="endDate">
            <div ng-messages="myForm.endDate.$error" >
              <div ng-message="date">请正确输入时间</div>
              <div ng-message="time-error">开始时间不应大于结束时间</div>
              <div ng-message="too-great">结束时间不应大于当前时间</div>
            </div>
          </md-input-container>
        </div>
        <div >
          <label style="width:70px">纬度统计</label>
          <md-select ng-model="params.statisticsType" placeholder="NC比例">
            <md-option ng-value="item.statisticsTypeCode" ng-repeat="item in statisticsTypes">{{item.statisticsTypeName}}</md-option>
          </md-select>
        </div>
      </div>
      <i class="glyphicon glyphicon-chevron-up shrinkage" ng-show="flag.arrow" ng-click="flag.state = false"></i>
      <md-button ng-disabled="myForm.$invalid" ng-click="search()" class="md-fab md-primary md-hue-1" aria-label="Profile">
      <i class="glyphicon glyphicon-arrow-down" style="margin-top:28px;"  ng-show="!flag.state"></i>
      <i class="glyphicon glyphicon-search" ng-show="flag.state"></i>
      </md-button>
    </div>
  </form>
  <div class="table-info">
    <switching-button flag="flag" export-url="{{formPrefix}}" export-value="outData"></switching-button>
    <div ng-show="flag.show === 'view'">
      <div id="doc" style="height:450px;"></div>
    </div>
    <div>
    <div ng-show="flag.show === 'table'">
      <div class="table-detail" >
        <div class="t_r">
          <table class="table table-bordered">
          <caption style="text-align:center;font-size:large;font-weight:bold;color:black">{{send.title}}</caption>
          <thead>
            <tr>
              <th>时间</th>
              <th>工单类型</th>
              <th>{{NCNumTh}}（单位:个）</th>
              <th>{{totalNumTh}}（单位:个）</th>
              <th>{{NCPercentageTh}}</th>
            </tr>
          </thead>
            <tbody>
              <tr ng-repeat="item in items">
               <td>{{item.time}}</td>
               <td>{{item.workOrderType}}</td>
               <td>{{item.ncNum}}</td>
               <td>{{item.totalNum}}</td>
               <td>{{item.ncPercentage}}</td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
    </div>
  </div>
  </div>
</div>